package com.youkeyi.ddy.cloud.common.api.application.system.todo;

import com.youkeyi.ddy.cloud.common.api.application.system.tag.param.SystemTagCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.todo.dto.SystemTodoListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.system.todo.param.SystemTodoCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.todo.param.SystemTodoDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.todo.param.SystemTodoListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.todo.param.SystemTodoUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 系统待办提醒
 *
 * @author liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【SYSTEM】Todo management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-SYSTEM", fallback = SystemTodoCloudServiceFallback.class)
@RequestMapping("/system/todo")
public interface SystemTodoCloudService {

    // 查询待办提醒列表
    @ApiOperation(value = "Query System Todo List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.todo.SystemTodoCloudService.todoList")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = SystemTodoListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query System Todo List", dataType = "SystemTodoListCloudParam", dataTypeClass = SystemTodoListCloudParam.class),
    })
    @GetMapping("/todo")
    public abstract SystemTodoListCloudDto todoList(SystemTodoListCloudParam param);

    // 查询已办列表
    @ApiOperation(value = "Query System Done List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.todo.SystemTodoCloudService.doneList")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = SystemTodoListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query System Done List", dataType = "SystemTodoListCloudParam", dataTypeClass = SystemTodoListCloudParam.class),
    })
    @GetMapping("/done")
    public abstract SystemTodoListCloudDto doneList(SystemTodoListCloudParam param);
    
    
    // 编辑待办提醒
    @ApiOperation(value = "Update System Todo", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.todo.SystemTodoCloudService.finish")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update System Todo", dataType = "SystemTodoUpdateCloudParam", dataTypeClass = SystemTodoUpdateCloudParam.class),
    })
    @PatchMapping("/finish")
    public abstract ResponseContent finish(@RequestBody SystemTodoUpdateCloudParam param);


    // 创建待办提醒
    @ApiOperation(value = "Create System Todo", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.todo.SystemTodoCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create System Todo", dataType = "SystemTodoCreateCloudParam", dataTypeClass = SystemTodoCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody SystemTodoCreateCloudParam param);


    // 删除待办提醒
    @ApiOperation(value = "Delete System Todo", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.todo.SystemTodoCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete System Todo", dataType = "SystemTodoDeleteCloudParam", dataTypeClass = SystemTodoDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(SystemTodoDeleteCloudParam param);

}
